package work5.CourseManagement;

public class Course {
    private int id;
    private String name;
    private double credit;


    public Course() {
    }

    public Course(int id, String name, double credit) {
        this.id = id;
        this.name = name;
        this.credit = credit;
    }

    public Course(int id, String name) {
        this.id = id;
        this.name = name;

    }

    public Course(int id) {
        this.id = id;
    }


    /**
     * 获取
     *
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * 设置
     *
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * 获取
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     *
     * @return credit
     */
    public double getCredit() {
        return credit;
    }

    /**
     * 设置
     *
     * @param credit
     */
    public void setCredit(double credit) {
        this.credit = credit;
    }

    public String toString() {
        return "Course{id = " + id + ", name = " + name + ", credit = " + credit + "}";
    }
}
